-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Fix: ConnectEmbed SIWE Revalidation #5080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 67a363f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
|
|
||
| const queryClient = useQueryClient(); | ||
|
|
||
| // We need to reset the react query cache on mount for components like ConnectEmbed that are unmount and remount depending on the auth / connection state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect useQuery to already refetch on mount? That is the standard behavior.
92716c2 to
a28ccb2
Compare
a28ccb2 to
a192d30
Compare
Merge activity
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5080 +/- ##
==========================================
- Coverage 45.29% 45.29% -0.01%
==========================================
Files 1059 1059
Lines 54728 54729 +1
Branches 3954 3957 +3
==========================================
Hits 24791 24791
- Misses 29246 29247 +1
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more.
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on fixing revalidation issues related to `siwe` authentication in the `ConnectEmbed` component by updating mutation keys to include the `activeAccount` address.
### Detailed summary
- Updated `mutationKey` for the `login` mutation to include `activeAccount?.address`.
- Updated `mutationKey` for the `logout` mutation to include `activeAccount?.address`.
- Added `gcTime`, `placeholderData`, and `refetchOnWindowFocus` options in the hook configuration.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
a192d30 to
67a363f
Compare
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on fixing revalidation issues with
siweauthentication in theConnectEmbedcomponent by updating the mutation keys to include theactiveAccountaddress.Detailed summary
mutationKeyforloginto includeactiveAccount?.address.mutationKeyforlogoutto includeactiveAccount?.address.gcTime,placeholderData, andrefetchOnWindowFocusoptions in the hook configuration.